<?php include('scripts.php'); ?>

<div class="bg_body row_3 un">
    <div class="ofh" id="bodyWrapper">
        <div class="module">
            <?php include_component('component', 'roundabout', array('param' => '1')) ?>
        </div>
    </div>
</div>
<div id="content">

    <!-- ========== CATEGORIES TABS ========= -->
    <!-- ==================================== -->
    <table id="contentMainWrapper" border="0" cellpadding="0" cellspacing="0" width="100%">
        <tbody>
        <tr>
            <td id="column-left" style="width: 215px;">
                <div style="width:215px;">
                    <!--// bof: categories //-->
                    <div class="box" id="categories" style="width:215px;">
                        <div class="box-border">
                            <div class="box-head">
                                <?php echo __('Categories') ?>
                            </div>
                            <div class="box-body">
                                <?php include_component('component', 'categoriesSideMenu') ?>
                            </div>
                        </div>
                    </div>
                    <!--// eof: categories //-->
                    <!--// bof: specials //-->
                    <div class="box" id="specials" style="width:215px;">
                        <div class="box-border">
                            <div class="box-head">
                                <a href="<?php echo url_for("/product/specialItem") ?>"><?php echo __('Specials') ?></a>
                            </div>
                            <div class="box-body">
                                <?php include_component('component', 'specialsSideMenu', array('param' => 'will implement for categoryType')) ?>
                            </div>

                        </div>
                    </div>
                    <!--// eof: specials //-->
                </div>
            </td>

            <td id="column-center" valign="top">
                <div class="column-center-padding">
                    <div class="centerColumn" id="indexDefault">
                        <div id="indexDefaultMainContent" class="content"></div>
                        <!-- bof: featured products  -->
                        <div class="centerBoxWrapper" id="featuredProducts">
                            <?php
                            $count = 0;
                            foreach ($cmsProducts as $cmsProduct) {
                                $title = $cmsProduct->getProductName()." #".$cmsProduct->getProductCode();
                                if ($sf_user->getCulture()=="cn") {
                                    $title = $cmsProduct->getProductNameCn()." #".$cmsProduct->getProductCode();
                                }
                            ?>
                            <div class="centerBoxContentsFeatured centeredContent back" style="width:33%;">
                                <div class="product-col" style="margin-left:5px;">
                                    <a class="name" href="<?php echo url_for("/product/item?id=".$cmsProduct->getProductId()) ?>"><?php echo $title; ?></a>

                                    <div class="img">
                                        <a href="<?php echo url_for("/product/item?id=".$cmsProduct->getProductId()) ?>">
                                        <img src="/uploads/products/<?php echo $cmsProduct->getProductPhoto() ?>" alt="<?php echo $title; ?>" title="<?php echo $title; ?>"
                                                height="177"></a>
                                    </div>
                                    <div class="text">
                                        <?php
                                            if ($sf_user->getCulture()=="cn") {
                                                echo $cmsProduct->getProductShortDescCn();
                                            } else {
                                                echo $cmsProduct->getProductShortDesc();
                                            }
                                        ?>
                                    </div>
                                    <div class="price">
                                        <?php if ($cmsProduct->getSpecialItem() == Globals::DB_YES && $cmsProduct->getPrice2() != null && $cmsProduct->getPrice2() != 0) { ?>
                                        <span class="normalprice">RM <?php echo number_format($cmsProduct->getPrice2(), 2) ?> </span>&nbsp;&nbsp;
                                        <?php } ?>
                                        <span class="productSpecialPrice">RM <?php echo number_format($cmsProduct->getPrice(), 2) ?></span>
                                    </div>
                                    <div class="button">
                                        <a href="<?php echo url_for("/product/item?id=".$cmsProduct->getProductId()) ?>" style="text-decoration: none"><img
                                            src="/images/buttons/arrow-right.png"
                                            alt="Go To This Product's Detailed Information"
                                            title=" Go To This Product's Detailed Information ">&nbsp;<strong>Product Details</strong></a>
                                    </div>
                                </div>
                            </div>
                            <?php
                                $count++;
                                if ($count % 3 == 0)
                                    echo "<br class='clearBoth'>";
                            }
                            ?>
                        </div>
                        <!-- eof: featured products  -->
                    </div>
                    <div class="clear"></div>
                    <!--eof content_center-->

                </div>
                <!-- BOF- BANNER #4 display -->
                <!-- EOF- BANNER #4 display -->
            </td>
        </tr>
        </tbody>
    </table>

</div>